﻿//
// Created: 2018/11/20
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.Util;

namespace Model.Util.Map
{
    internal  class UserCollectionMap:EntityTypeConfiguration< UserCollection >    
    {
        public UserCollectionMap()
        {
             this.ToTable("UserCollection");
             this.HasKey(i => new { i.CollectionId });
            this.Property(i => i.UserId).HasColumnName("UserId");
             this.Property(i => i.CollectionId).HasColumnName("CollectionId");                     
             this.Property(i => i.CollectDesc).HasColumnName("CollectDesc");                     
             this.Property(i => i.CollectUrl).HasColumnName("CollectUrl");                     
             this.Property(i => i.CreateTime).HasColumnName("CreateTime");                     
             this.Property(i => i.Remarks).HasColumnName("Remarks");                     
             this.Property(i => i.RefId).HasColumnName("RefId");                     
             this.Property(i => i.ImgUrl).HasColumnName("ImgUrl");                     
        }   
    }
    
     public static class UserCollectionMapExtensions
    {
        public static void UserUserCollectionMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new UserCollectionMap());
        }
    }
}